package com.corpcredit.model;

// Generated Jul 22, 2008 11:56:54 PM by Hibernate Tools 3.2.0.CR1

import java.math.BigDecimal;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.UniqueConstraint;
import javax.persistence.Version;

/**
 * Pdxm generated by hbm2java
 */
@Entity
@Table(name = "pdxm", uniqueConstraints = @UniqueConstraint(columnNames = "pdxm"))
public class Pdxm implements java.io.Serializable
{

    private Long id;
    private int version;
    private Pdfl2 pdfl2;
    private String username;
    private String operation;
    private Date optdate;
    private String pdxm;
    private String pdxmmc;
    private String pdsm;
    private String pflx;
    private BigDecimal bzz;
    private Integer xssx;
    private Set<PdxmfsJs> pdxmfsJses = new HashSet<PdxmfsJs>( 0 );
    private Set<PdxmfsMs> pdxmfsMses = new HashSet<PdxmfsMs>( 0 );
    private Set<Pddf> pddfs = new HashSet<Pddf>( 0 );

    public Pdxm()
    {
    }

    public Pdxm( Long id, String pdxm, String pdxmmc, BigDecimal bzz )
    {
        this.id = id;
        this.pdxm = pdxm;
        this.pdxmmc = pdxmmc;
        this.bzz = bzz;
    }

    public Pdxm( Long id,
                 Pdfl2 pdfl2,
                 String username,
                 String operation,
                 Date optdate,
                 String pdxm,
                 String pdxmmc,
                 String pdsm,
                 String pflx,
                 BigDecimal bzz,
                 Integer xssx,
                 Set<PdxmfsJs> pdxmfsJses,
                 Set<PdxmfsMs> pdxmfsMses,
                 Set<Pddf> pddfs )
    {
        this.id = id;
        this.pdfl2 = pdfl2;
        this.username = username;
        this.operation = operation;
        this.optdate = optdate;
        this.pdxm = pdxm;
        this.pdxmmc = pdxmmc;
        this.pdsm = pdsm;
        this.pflx = pflx;
        this.bzz = bzz;
        this.xssx = xssx;
        this.pdxmfsJses = pdxmfsJses;
        this.pdxmfsMses = pdxmfsMses;
        this.pddfs = pddfs;
    }

    @Id
    @Column(name = "ID", unique = true, nullable = false)
    @GeneratedValue(strategy=GenerationType.AUTO)
    public Long getId()
    {
        return this.id;
    }

    public void setId( Long id )
    {
        this.id = id;
    }

    @Version
    @Column(name = "version", nullable = false)
    public int getVersion()
    {
        return this.version;
    }

    public void setVersion( int version )
    {
        this.version = version;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "pdf_ID")
    public Pdfl2 getPdfl2()
    {
        return this.pdfl2;
    }

    public void setPdfl2( Pdfl2 pdfl2 )
    {
        this.pdfl2 = pdfl2;
    }

    @Column(name = "username", length = 50)
    public String getUsername()
    {
        return this.username;
    }

    public void setUsername( String username )
    {
        this.username = username;
    }

    @Column(name = "operation", length = 20)
    public String getOperation()
    {
        return this.operation;
    }

    public void setOperation( String operation )
    {
        this.operation = operation;
    }

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "optdate", length = 23)
    public Date getOptdate()
    {
        return this.optdate;
    }

    public void setOptdate( Date optdate )
    {
        this.optdate = optdate;
    }

    @Column(name = "pdxm", unique = true, nullable = false, length = 10)
    public String getPdxm()
    {
        return this.pdxm;
    }

    public void setPdxm( String pdxm )
    {
        this.pdxm = pdxm;
    }

    @Column(name = "pdxmmc", nullable = false, length = 100)
    public String getPdxmmc()
    {
        return this.pdxmmc;
    }

    public void setPdxmmc( String pdxmmc )
    {
        this.pdxmmc = pdxmmc;
    }

    @Column(name = "pdsm", length = 500)
    public String getPdsm()
    {
        return this.pdsm;
    }

    public void setPdsm( String pdsm )
    {
        this.pdsm = pdsm;
    }

    @Column(name = "pflx", length = 1)
    public String getPflx()
    {
        return this.pflx;
    }

    public void setPflx( String pflx )
    {
        this.pflx = pflx;
    }

    @Column(name = "bzz", nullable = false, precision = 18)
    public BigDecimal getBzz()
    {
        return this.bzz;
    }

    public void setBzz( BigDecimal bzz )
    {
        this.bzz = bzz;
    }

    @Column(name = "xssx")
    public Integer getXssx()
    {
        return this.xssx;
    }

    public void setXssx( Integer xssx )
    {
        this.xssx = xssx;
    }

    @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "pdxm")
    public Set<PdxmfsJs> getPdxmfsJses()
    {
        return this.pdxmfsJses;
    }

    public void setPdxmfsJses( Set<PdxmfsJs> pdxmfsJses )
    {
        this.pdxmfsJses = pdxmfsJses;
    }

    @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "pdxm")
    public Set<PdxmfsMs> getPdxmfsMses()
    {
        return this.pdxmfsMses;
    }

    public void setPdxmfsMses( Set<PdxmfsMs> pdxmfsMses )
    {
        this.pdxmfsMses = pdxmfsMses;
    }

    @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "pdxm")
    public Set<Pddf> getPddfs()
    {
        return this.pddfs;
    }

    public void setPddfs( Set<Pddf> pddfs )
    {
        this.pddfs = pddfs;
    }

}
